/************************************************************
 * Project Name         [Thinking_In_Java]
 * File Name            [Example_06_Abstract_Class_Test.java]
 * Creation Date        [18-Jun-2014]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ************************************************************/
package pkg_02_oop;

/**
 * 
 * 抽象类测试
 * 
 * @author 不落的太阳(Sean Yang)
 * @version 1.0
 * @since JDK 6
 * 
 */
public class Example_06_Abstract_Class_Test {

	/**
	 * 测试方法
	 * 
	 * @param args
	 *            命令行参数
	 */
	public static void main(String[] args) {
		Example_06_Abstract_Shape triangle1 = new Example_06_Triangle();
		System.out.println("Grith is " + triangle1.getGirth());
		System.out.println("Area is " + triangle1.getArea());

		// System.out.println((triangle1 instanceof Example_06_Triangle));

		Example_06_Triangle triangle2 = new Example_06_Triangle(6, 7, 8);
		System.out.println("Grith is " + triangle2.getGirth());
		System.out.println("Area is " + triangle2.getArea());

		Example_06_Abstract_Shape rectangle1 = new Example_06_Rectangle();
		System.out.println("Grith is " + rectangle1.getGirth());
		System.out.println("Area is " + rectangle1.getArea());

		Example_06_Rectangle rectangle2 = new Example_06_Rectangle(10, 20);
		System.out.println("Grith is " + rectangle2.getGirth());
		System.out.println("Area is " + rectangle2.getArea());

	}

}
